package com.atguigu.day04;

import java.util.Scanner;

public class Test6 {

    public static void main(String[] args) {
        int year;
        int month;
        int day;
        int days = 0;
        Scanner s = new Scanner(System.in);
        System.out.print("请输入年:");
        year = s.nextInt();
        System.out.print("请输入月:");
        month = s.nextInt();
        System.out.print("请输入日:");
        day = s.nextInt();
        //366+365+365+365+366+
        switch ((year - 2000) % 4) {
            case 0:
                days += (366 + 365 + 365 + 365) * ((year - 2000) / 4);
                break;
            case 1:
                days += (366 + 365 + 365 + 365) * ((year - 2000) / 4) + 366;
                break;
            case 2:
                days += (366 + 365 + 365 + 365) * ((year - 2000) / 4) + 366 + 365;
                break;
            case 3:
                days += (366 + 365 + 365 + 365) * ((year - 2000) / 4) + 365 * 3 + 1;
                break;
        }
        switch (month) {
            case 12:
                days += 30;
            case 11:
                days += 31;
            case 10:
                days += 30;
            case 9:
                days += 31;
            case 8:
                days += 31;
            case 7:
                days += 30;
            case 6:
                days += 31;
            case 5:
                days += 30;
            case 4:
                days += 31;
            case 3:
                if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)
                    days += 29;
                else
                    days += 28;
            case 2:
                days += 31;
            case 1:
                days += day;
                break;
        }
        System.out.println("距离2000年已经过去了" + days + "天");
        switch (days % 5) {
            case 1:
            case 2:
            case 3:
                System.out.println("今天打鱼!");
                break;
            case 4:
            case 0:
                System.out.println("今天晒网!");
                break;
        }
    }
}
